package com.example.order.controller;

import com.example.order.service.StorageService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class StorageController {
    @Autowired
    private StorageService storageService;
    @GetMapping("/decrease")
    public String decrease(Long productId,Integer num){
        storageService.decrease(productId, num);
        return "商品数量减少成功！";
    }
}
